package service

import "bc/dao"

type menu struct {

}
func (t *menu)Create(d map[string]interface{}) (bool,int) {

	b,i := dao.MenuDao.Create(d)
	return b,i

}
func (t *menu)Delete(w map[string]interface{}) bool {

	return dao.MenuDao.Delete(w)

}
func (t *menu)Update(w map[string]interface{},f map[string]interface{}) bool {

	return dao.MenuDao.Update(w,f)

}
func (t *menu)Find(w map[string]interface{},page int64,pageSize int64) ([]*dao.Menu,int,error) {

	d,total,err := dao.MenuDao.Find(w,page,pageSize)
	return d,total,err

}
func (t *menu)First(w map[string]interface{}) (bool, *dao.Menu)  {

	b,d := dao.MenuDao.First(w)
	return b,d

}
func (t *menu)Nodes()([]*dao.Menu){

	data := dao.MenuDao.Nodes()

	return data
}

var Menu = &menu{}
